
<?php

foreach ($list["listcatalog"] as $key => $listcata) {
    $titlecatalog = $listcata["catalogName"];
    echo '<section><div class="container"><div class="titlecategories">' .
    '<h2><a href="'.WEB_PATH.'/'.$listcata["catalogLink"].'.html" title="' . $titlecatalog . '"><i class="fa fa-bars"></i> ' . $titlecatalog . '</a></h2>' .
    '<span class="morecate"><a href="#" title="' . $titlecatalog . '">Xem thêm <i class="fa fa-angle-double-right"></i> </a></span>' .
    '</div><div class="catect">';
    if (count($list["listvideos"][$key]) > 0) {
        foreach ($list["listvideos"][$key] as $key2 => $listvideo) {
            $videosTitle = $listvideo["videoName"];
            $img = WEB_PATH . "/public/" . $listvideo["videoImgThumb"];
            $linkvideos = WEB_PATH . "/" . $listvideo["catalogLink"] . "/" . $listvideo["videoLink"] . ".html";
            echo '<div class="videossub_cate">' .
            '<a href="' . $linkvideos . '" title="' . $videosTitle . '"><img  class="img-responsive" src="' . $img . '" alt="' . $videosTitle . '"/></a>' .
            '<div class="captitle">' .
            '<a href="' . $linkvideos . '" title="' . $videosTitle . '">' . $videosTitle . '</a>' .
            '</div>' .
            '</div>';
        }
    } else {
        echo 'Chưa có videos trong chuyên mục này.';
    }
    echo '</div></div></section>';
}

    

